package com.gzl.ggserver.server.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.alibaba.fastjson.JSONObject;
import com.gzl.ggserver.DAO.IDotestDAO;
import com.gzl.ggserver.domain.Dotest;
import com.gzl.myapi.service.IDotestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;


/**
 * Created by guoxiaolin on 2018/7/16.
 */
@Service(interfaceClass = IDotestService.class,retries = 0)
@Component
public class DotestServiceImpl implements IDotestService {

    @Autowired
    private IDotestDAO idotestdao;


    @Override
    @Transactional
    public JSONObject updateDotest(){

       Dotest dotest = idotestdao.getlist().get(0);
       dotest.setNumber(dotest.getNumber()+1);

       idotestdao.updateDotest(dotest);
       return null;

    }

}
